const http=require('http')
const querystring=require('querystring')
const postData=querystring.stringify({
    province:'上海',
    city:'上海',

})
const options={
    protocol:'http',
     hostname:'localhost',
     method:3000,
     path:'/data',
     headers:{ 
       'Content-type':'application/x-www-form-urlencoded',
       'Content-Length':Buffer.byteLength(postData)
     }
} 
const server= http.createServer((req,res)=>{
  const request= http.request(options,(result)=>{
      
  })
//   (result)=>{
    request.write(postData)
      request.end()

      res.end()
//   }
}) 

server.listen(8080,()=>{
    console.log('localhost:8080')
})   